import 'dart:developer';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/instance_manager.dart';
import 'package:guochaoapp/common/utils/http_client.dart';
import 'package:guochaoapp/controller/gc_controller.dart';

class TestPushPage extends StatelessWidget {
  final c = Get.put(GCController());

  var loginToken = "".obs;

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        title: Text("测试页面"),
      ),
      body: Center(
        child: Column(
          children: [
            RaisedButton(
              child: Text("点击计数+1"),
              onPressed: () {
                c.increment();
              },
            ),
            Obx(() => Text("${c.count}")),
            RaisedButton(
              child: Text("返回"),
              onPressed: () {
                Get.back();
              },
            ),
            RaisedButton(
              child: Text("发起网络请求"),
              onPressed: () {
                _requestNetData();
              },
            ),
            Obx(() => Text("接口返回结果 : ${loginToken}")),
          ],
        ),
      ),
    );
  }

  _requestNetData() {

  }
}
